package ru.amse.tsyganov.jumleditor.view.lines;


public class VerticalMiddleLine extends MiddleLine {
	
	public VerticalMiddleLine() {
	}
	
	public int getX1() {
		if (getFromLine() instanceof FromConnectionPointLine) {
			return getFromLine().getX2();
		} else {
			return getToLine().getX1();
		}
	}
	
	public int getY1() {
		if (getFromLine() instanceof FromConnectionPointLine) {
			return getFromLine().getY2();
		} else {
			return getFromLine().getY1();
		}
	}

	public int getX2() {
		return getX1();
	}

	public int getY2() {
		return getToLine().getY1();
	}

	public void setX1(int x1) {
		getFromLine().setX2(x1);
		getToLine().setX1(x1);
	}

	public void setX2(int x2) {
		getFromLine().setX2(x2);
		getToLine().setX1(x2);
	}

	public void setY1(int y1) {
	}

	public void setY2(int y2) {
	}

}
